HAL OTFDEC constants migration ¶
This section provides information about the HAL OTFDEC constants migration.
In HAL2, the OTFDEC is managed as a core driver, and it’s wrapped by the HAL XSPI driver. For more details about the OTFDEC core APIs, please refer to HAL OTFDEC migration: List of applicable concepts.
Several HAL1 OTFDEC constants are removed, renamed, or replaced by XSPI OTFDEC
constants in HAL2. In HAL2, constants are mainly consumed through
HAL_XSPI_OTFDEC_XXX
defines and HAL2 enumerations.
HAL OTFDEC error codes constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define HAL_OTFDEC_ERROR_NONE
#define HAL_OTFDEC_ERROR_INVALID_CALLBACK
|
#define HAL_XSPI_ERROR_OTFDEC_NONE
Removed; These kinds of logical errors are reported by direct function return. |
Related concepts:
HAL OTFDEC specific error types constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define HAL_OTFDEC_EXECUTE_ERROR
#define HAL_OTFDEC_KEY_ERROR
#define HAL_OTFDEC_SECURITY_ERROR
|
#define HAL_XSPI_ERROR_OTFDEC_EXEC_ONLY_EXEC_NEVER
#define HAL_XSPI_ERROR_OTFDEC_KEY
#define HAL_XSPI_ERROR_OTFDEC_SECURITY
|
Related concepts:
HAL OTFDEC attribute flags constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define OTFDEC_ATTRIBUTE_NPRIV
#define OTFDEC_ATTRIBUTE_PRIV
|
typedef enum
{
HAL_XSPI_OTFDEC_NPRIV,
HAL_XSPI_OTFDEC_PRIV
} hal_xspi_otfdec_priv_attr_t;
|
Related concepts:
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels.
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions).
HAL OTFDEC region identifiers constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define OTFDEC_REGION1
#define OTFDEC_REGION2
#define OTFDEC_REGION3
#define OTFDEC_REGION4
|
typedef enum
{
HAL_XSPI_OTFDEC_REGION_1,
HAL_XSPI_OTFDEC_REGION_2,
HAL_XSPI_OTFDEC_REGION_3,
HAL_XSPI_OTFDEC_REGION_4
} hal_xspi_otfdec_region_t;
|
Related concepts:
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels.
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions).
HAL OTFDEC register configuration lock enable/disable constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define OTFDEC_REG_CONFIGR_LOCK_DISABLE
#define OTFDEC_REG_CONFIGR_LOCK_ENABLE
|
typedef enum
{
HAL_XSPI_OTFDEC_LOCK_CONFIG_DISABLED,
HAL_XSPI_OTFDEC_LOCK_CONFIG_ENABLED
} hal_xspi_otfdec_lock_config_status_t;
|
Related concepts:
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels.
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions).
HAL OTFDEC register processing enable/disable constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define OTFDEC_REG_CONFIGR_REG_DISABLE
#define OTFDEC_REG_CONFIGR_REG_ENABLE
|
Used internally and does not affect user level operation. |
HAL OTFDEC register mode options constants ¶
|
HAL1 |
HAL2 |
|---|---|
#define OTFDEC_REG_MODE_INSTRUCTION_ACCESSES_ONLY
#define OTFDEC_REG_MODE_DATA_ACCESSES_ONLY
#define OTFDEC_REG_MODE_INSTRUCTION_OR_DATA_ACCESSES
#define OTFDEC_REG_MODE_INSTRUCTION_ACCESSES_ONLY_WITH_CIPHER
|
typedef enum
{
HAL_XSPI_OTFDEC_MODE_INSTRUCTION_ACCESSES_ONLY,
HAL_XSPI_OTFDEC_MODE_DATA_ACCESSES_ONLY,
HAL_XSPI_OTFDEC_MODE_ALL_READ_ACCESS,
HAL_XSPI_OTFDEC_MODE_ENHANCED_ENCRYPTION
} hal_xspi_otfdec_mode_t;
|
Related concepts:
Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels.
Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions).
HAL OTFDEC interrupt constant ¶
|
HAL1 |
HAL2 |
|---|---|
#define OTFDEC_SEC_ERROR_INT
#define OTFDEC_EXE_ERROR_INT
#define OTFDEC_KEY_ERROR_INT
#define OTFDEC_SEC_EXE_ERROR_INT
#define OTFDEC_SEC_KEY_ERROR_INT
#define OTFDEC_EXE_KEY_ERROR_INT
#define OTFDEC_ALL_INT
|
#define HAL_XSPI_OTFDEC_IT_SECURITY_ERROR
#define HAL_XSPI_OTFDEC_IT_EXEC_ONLY_EXEC_NEVER_ERROR
#define HAL_XSPI_OTFDEC_IT_KEY_ERROR
/* All predefined combinations have been removed,
and HAL2 now retains only the base error interrupt sources */
#define HAL_XSPI_OTFDEC_IT_ALL
|
Related concepts: